package com.yanlight.support.wx.model;

import java.util.SortedMap;
import java.util.TreeMap;

public class WxMicroSign {

    private String version = "3.0";

    //证书序列号
    private String cert_sn;

    private String appId;
    private String timeStamp;
    private String nonceStr;
    private String signType = "HMAC-SHA256";
    private String paySign;

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(String timeStamp) {
        this.timeStamp = timeStamp;
    }

    public String getNonceStr() {
        return nonceStr;
    }

    public void setNonceStr(String nonceStr) {
        this.nonceStr = nonceStr;
    }

    public String getSignType() {
        return signType;
    }

    public void setSignType(String signType) {
        this.signType = signType;
    }

    public String getPaySign() {
        return paySign;
    }

    public void setPaySign(String paySign) {
        this.paySign = paySign;
    }

    public SortedMap<String, String> signParams() {
        SortedMap<String, String> signParams = new TreeMap<String, String>();
        signParams.put("appId", getAppId());
        signParams.put("timeStamp", getTimeStamp());
        signParams.put("nonceStr", getNonceStr());
        signParams.put("signType", getSignType());
        return signParams;
    }
}
